<nz-spin [nzSpinning]="isSpinning" [nzTip]="'正在初始化模块信息...'">
    <section class="in-index">
      <div class="table-operations" style="margin: 16px 0;padding: 0 2%">
          <button style="background: #ef4954;color: #fff;" nz-button   [routerLink]="[ '../schooladd' ]">
              <i class="anticon anticon-plus"></i>
              <span>新增</span>
            </button>
        <button nz-button  [disabled]="!allChecked && !indeterminate " (click)="deleschool()">
          <i class="anticon anticon-close-circle-o"></i>
          <span>删除</span>
        </button>
        <button nz-button (click)="getEntityList()" [nzLoading]="loadingData">
          <i class="anticon anticon-reload"></i>
          <span>刷新</span>
        </button>
      </div>
      <div class="table-bg" style="background: #ef4954;height: 60px;width: 100%;display:flex;align-items: center;justify-content: flex-start;width: 96% !important;margin: 0 auto;border-radius:4px !important;padding-left: 16px !important;">
        <!-- <div>
          <nz-select style="width: 200px;" [(ngModel)]="listSearchValue[0].propertyValue" (ngModelChange)="provinceChange($event)">
            <nz-option *ngFor="let p of provinceData" [nzValue]="p" [nzLabel]="p"></nz-option>
          </nz-select>
          <nz-select style="width: 200px;" [(ngModel)]="listSearchValue[1].propertyValue">
            <nz-option *ngFor="let c of cityData[listSearchValue[0].propertyValue]" [nzValue]="c" [nzLabel]="c"></nz-option>
          </nz-select><span style="color: red">*</span>
        </div> -->
        <div>
          <span style="color:#fff;padding-left:30px ">使用版权:</span>
          <nz-radio-group [(ngModel)]="listSearchValue[0].propertyValue">
            <label nz-radio-button nzValue='true'>正式</label>
            <label>&nbsp;</label>
            <label nz-radio-button nzValue='false'>试用</label>
          </nz-radio-group>
        </div>
        <div style="padding:0 30px;">
          <span style="color: #fff;">使用状态:</span>
          <nz-radio-group [(ngModel)]="listSearchValue[1].propertyValue">
            <label nz-radio-button nzValue='true'>启用</label>
            <label>&nbsp;</label>
            <label nz-radio-button nzValue='false'>停用</label>
          </nz-radio-group>
        </div>
        <div>
          <input (keydown)="shoolsearchinput($event)" nz-input placeholder="学校名称" [(ngModel)]="listSearchValue[2].propertyValue">
        </div>
        <div style="margin-left: 20px;">
          <button (click)="shoolsearch()" nz-button style="background: #fff;color:#aaa">搜索</button>
        </div>
        <div style="margin-left: 20px;">
          <button (click)="shoolcancle()" nz-button style="background: #fff;color:#aaa">取消</button>
        </div>
      </div>
      <nz-table
      [nzLoading]="loadingData" [nzFrontPagination]="false"
      [nzTotal]="listEntities.recordTotalCount" [(nzPageIndex)]="listEntities.currentPageIndex" (nzPageIndexChange)="getEntityListAsync(true)"
      [(nzPageSize)]="listEntities.pageSize"
      #nzTable #nzFixedHeader nzBordered
      #rowSelectionTable
      [nzData]="listEntities.entities"
      (nzCurrentPageDataChange)="currentPageDataChange($event)">
      <thead nz-thead>
        <tr>
          <th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"
          style="width: 60px;">
        </th>
        <th style="text-align: center;">
          <span>校名</span>
        </th>
        <th style="text-align: center;">
          <span>用户名</span>
        </th>
        <th style="text-align: center;">
          <span>负责人姓名</span>
        </th>
        <th style="text-align: center;">
            <span>负责人电话</span>
          </th>
          <th style="text-align: center;">
              <span>使用权限</span>
            </th>
        <th nz-th style="text-align: center;">操作</th>
        </tr>
      </thead>
      <tbody nz-tbody style="text-align: center;">
        <tr  nz-tbody-tr *ngFor="let data of rowSelectionTable.data">
          <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus1(data.id,$event)"></td>
          <td nz-td>
            <span>{{data.schoolName}}</span>
          </td>
          <td nz-td>
            <span>{{data.userName}}</span>
          </td>
          <td nz-td>
            <span>{{data.personName}}</span>
          </td>
          <td nz-td>
            <span>{{data.phoneNumber}}</span>
          </td>
          <td nz-td>
            <span>{{data.enableOrDiscontinuation?"正式":"试用"}}</span>
          </td>
          <td nz-td>
            <a (click)="editor(data.id)">
              <i class="anticon anticon-edit"></i>编辑</a>
            <!-- <a (click)="schoolManagementy(data.id)">
              <i class="anticon anticon-edit"></i>学院管理</a> -->
            <a (click)="ResetPasswords(data.id)">
              <i class="anticon anticon-lock"></i>重置密码</a>
            <nz-switch (ngModelChange)="qy(data.id,$event)" style="display: inline-block" [ngModel]="data.isActive" nzCheckedChildren="启用" nzUnCheckedChildren="停用"></nz-switch>
          </td>
        </tr>
      </tbody>
    </nz-table>
    <!-- <nz-pagination style="float: right;" [(nzPageIndex)]="listEntities.currentPageIndex" [(nzPageSize)]="listEntities.pageSize" [nzTotal]="listEntities.recordTotalCount"
      (nzPageIndexChange)="getEntityList()" nzShowTotal></nz-pagination> -->
    <nz-modal [(nzVisible)]="isVisible" nzTitle="编辑" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk('success')">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="noticeName">使用时限</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <nz-radio-group [(ngModel)]="radioValueflex">
                    <label nz-radio-button nzValue='false'>试用</label>
                    <label nz-radio-button nzValue='true'>正式</label>
                  </nz-radio-group>
                  &nbsp;&nbsp;
              <nz-date-picker *ngIf="radioValueflex=='false'" style="width: 100px" [(ngModel)]="time"></nz-date-picker>
            </nz-form-control>
          </nz-form-item >
          <nz-form-item>
              <nz-form-label [nzSpan]="6" nzFor="noticeName">学校名称</nz-form-label>
              <nz-form-control [nzSpan]="14">
                  <span>{{schoolName}}</span>
                <!-- <input placeholder="请输入学校名称" style="width: 260px" nz-input  [id]="noticeContent4" [(ngModel)]="schoolName"/> <span style="color: red">*</span> -->
              </nz-form-control>
          </nz-form-item >
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="noticeName">学院名称</nz-form-label>
            <nz-form-control [nzSpan]="14">
              <span>{{collegelName}}</span>
                <!-- <input placeholder="请输入学校名称" style="width: 260px" nz-input  [id]="noticeContent6" [(ngModel)]="collegelName"/> <span style="color: red">*</span> -->
            </nz-form-control>
          </nz-form-item >
          <!-- <nz-form-item>
              <nz-form-label [nzSpan]="6" nzFor="noticeName">学校地址</nz-form-label>
              <div>
                  <nz-select style="width: 130px;" [(ngModel)]="selectedProvince" (ngModelChange)="provinceChange($event)">
                    <nz-option *ngFor="let p of provinceData" [nzValue]="p" [nzLabel]="p"></nz-option>
                  </nz-select>
                  <nz-select style="width: 130px;" [(ngModel)]="selectedCity">
                    <nz-option *ngFor="let c of cityData[selectedProvince]" [nzValue]="c" [nzLabel]="c"></nz-option>
                  </nz-select><span style="color: red">*</span>
                </div>
          </nz-form-item > -->
          <nz-form-item >
              <nz-form-label [nzSpan]="6" nzFor="noticeContent">负责人姓名</nz-form-label>
              <nz-form-control [nzSpan]="14">
                  <input placeholder="请填写姓名"  style="width: 260px" nz-input [(ngModel)]="personName"/> <span style="color: red">*</span>
              </nz-form-control>
          </nz-form-item >
          <nz-form-item >
              <nz-form-label [nzSpan]="6" nzFor="noticeContent">负责人电话</nz-form-label>
              <nz-form-control [nzSpan]="14">
                  <input placeholder="请填写电话" style="width: 260px" nz-input [(ngModel)]="personPhone"/> <span style="color: red">*</span>
              </nz-form-control>
          </nz-form-item >
          <nz-form-item >
              <nz-form-label [nzSpan]="6" nzFor="noticeContent">负责人邮箱</nz-form-label>
              <nz-form-control [nzSpan]="14">
                  <input placeholder="请填写邮箱" style="width: 260px" nz-input [(ngModel)]="personEmail"/> <span style="color: red">*</span>
              </nz-form-control>
          </nz-form-item >
          <nz-form-item >
              <nz-form-label [nzSpan]="6" nzFor="noticeContent">用户名</nz-form-label>
              <nz-form-control [nzSpan]="14">
                <span>{{personUserName}}</span>
                  <!-- <input placeholder="请填写用户名" style="width: 260px" nz-input  [id]="noticeContent3" [(ngModel)]="personUserName"/> <span style="color: red">*</span> -->
              </nz-form-control>
          </nz-form-item >
          <nz-form-item >
              <nz-form-label [nzSpan]="6" nzFor="noticeContent">密码</nz-form-label>
              <nz-form-control [nzSpan]="14">
                  <input placeholder="请填写密码"  type="text" style="width: 260px" nz-input  [id]="personPassword" [(ngModel)]="personPassword"/> <span style="color: red">*</span>
              </nz-form-control>
          </nz-form-item >
      </nz-modal>
      <nz-modal [(nzVisible)]="isVisiblemm" nzTitle="编辑" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOkmm('success')">

          <nz-form-item >
              <nz-form-label [nzSpan]="6" nzFor="noticeContent111">新密码</nz-form-label>
              <nz-form-control [nzSpan]="14">
                  <input placeholder="请填写密码"  type="text" style="width: 260px" nz-input [(ngModel)]="repassword"/> <span style="color: red">*</span>
              </nz-form-control>
          </nz-form-item >

      </nz-modal>
      <nz-modal [(nzVisible)]="smisVisible" nzTitle="确定要删除吗？" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOksm('success')">
        <p>已选中{{checkedNumber}}条</p>
      </nz-modal>
    </section>
  </nz-spin>


